import { IMenu } from "@/api/service/menu/types";

export const showForm = ref(false);

const formObject: IMenu = {
  menuId: "",
  menuName: "",
  parentName: null,
  parentId: "0",
  orderNum: undefined as any,
  path: "",
  component: "",
  isFrame: 1,
  isCache: "1",
  menuType: "M",
  visible: "0",
  status: "0",
  perms: "",
  icon: "#",
  createBy: "",
  createTime: "",
  updateBy: "",
  updateTime: "",
  remark: "",
  params: {},
  children: [],
  meta: undefined
};

export const formData = ref({
  ...formObject
});
export const resetForm = () => {
  formData.value = {
    ...formObject
  };
};
